import tkinter as tk
import common

class RegularPanel():
    __static_obj = None
    
    def __init__(self, right_panel) -> None:
        self.regular_panel = tk.Frame(right_panel, borderwidth=1, relief=tk.SOLID)
        #self.regular_panel.place(x=0, y=0, width=right_panel.winfo_width(), height=right_panel.winfo_height())
        
        self.regular_entry = tk.Entry(self.regular_panel)
        self.regular_entry.pack(side=tk.BOTTOM)
        #self.regular_entry.place(x=0, y=0, width=20, height=50)
        self.regular_panel.pack_forget()
        common.right_panel_register("regular", self.regular_panel)
        print("RegularPanel init")
    
    @classmethod
    def instance(cls, *args, **kwargs):
        if not cls.__static_obj:
            cls.__static_obj = cls(*args, **kwargs)
        return cls.__static_obj
    
    def show_regular_panel(self):
        common.right_panel_show("regular")
    